import { Column, Model, Table } from 'sequelize-typescript'
import { DataTypes } from 'sequelize'

@Table({
  tableName: 'secondctgy',
})
export default class Secondctgy extends Model<Secondctgy> {
  @Column({
    type: DataTypes.INTEGER,
    field: 'secondctgyid',
    primaryKey: true,
    autoIncrement: true,
  })
  secondctgyid!: number
  @Column({
    type: DataTypes.STRING(30),
    field: 'secctgyname',
    allowNull: false, // 是否为空
  })
  public secctgyname!: string
  @Column({
    type: DataTypes.INTEGER,
    field: 'firstctgyId',
    allowNull: false, // 是否为空
  })
  firstctgyId!: number
}
